package com.atguigu.behavior.interpretor;

import java.util.HashMap;

//减法法运算符解析器
//加法运算符解析器
public class SubExpression extends OperatorExpression {
    SubExpression(Expression varLeft, Expression varRight) {
        super(varLeft, varRight);
    }
    @Override
    public int interpreter(HashMap<String, Integer> var) {
        return super.varLeft.interpreter(var) - super.varRight.interpreter(var); 
    }
}
